<template>
    <div class="index">
        <p v-if="e" >激活成功，请登录</p >
        <p v-if="!e">激活失败，请勿修改链接</p>
        <p>{{ time }} 后自动跳转至登录页</p>        
    </div>

</template>

<script setup>
import {defineOptions,onMounted,ref} from 'vue';
import {useRoute,useRouter } from 'vue-router';


const route = useRoute();
const router = useRouter();
const time = ref(5)



const e = ref(true);
onMounted(()=>{
    console.log(route.params.or)
    if(route.params.or !== '1'){
        e.value =  false;
    }
    setInterval(()=>{
        if(time.value === 1){
            router.push('/')
        }
        time.value--;

    },1000);  
})
defineOptions({
    name:'ac'
})


</script>

<style lang="less" scoped>
    .index{
        margin: auto auto;
        width: 90%;
        height: 90%;
        background-color: #eee;
        opacity: 0.8;
    }
</style>